﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ajax_list_nghiep_vu.aspx.cs" Inherits="web_pages_ajax_list_nghiep_vu" %>

<%@ OutputCache Duration="1" VaryByParam="None" %>

<p>
<table>
    <tr>
        <td> 
            Chọn Nghiệp vụ
        </td>
        <td>
            <select id="cbb_nghiep_vu">  
                  
                <%
                    for (int i = 0; i < dtt_root.Rows.Count; i++)
                    {

                        if (Convert.ToInt32(dtt_root.Rows[i]["nut_la"])==1)
                        {
                 %>
                    <option value="<%=dtt_root.Rows[i]["ma_nghiep_vu"].ToString() %>" ><%=dtt_root.Rows[i]["ten_nghiep_vu"].ToString()%> </option>
                
                <%
                    }
                    else
                    {
                 %>
                <optgroup label="<%=dtt_root.Rows[i]["ten_nghiep_vu"].ToString()%>">
                        
                        <%
                            dtt_node = load(dtt_root.Rows[i]["ma_nghiep_vu"].ToString());

                            for (int j = 0; j < dtt_node.Rows.Count; j++)
                            {
                                %>
                                <option value="<%=dtt_node.Rows[j]["ma_nghiep_vu"].ToString() %>" ><%=dtt_node.Rows[j]["ten_nghiep_vu"].ToString()%> </option>
                                <%
                            }
                         %>
                
                
                 </optgroup>       
               <%
                    }
                }
                %>
               
                
               
                
            
            </select>
        </td>
        <td>
            Hạng yêu cầu
            <select id="cbb_hang" runat="server" >
                
            </select>
        </td>
    </tr>
</table>
</p>